package com.music.user.api;

import com.music.common.core.constant.SecurityConstants;
import com.music.common.core.constant.ServiceNameConstants;
import com.music.common.core.domain.R;
import com.music.user.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Author 史豪通
 * Date 2024/10/27 17:14
 */
@FeignClient(ServiceNameConstants.USER_SERVICE)
public interface RemoteUserService {
    @GetMapping("/user/web")
    public R<User> getUserInfo(@RequestParam("userAccount") String userAccount, @RequestParam("userPassword") String userPassword, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/user/web/findUserByAccount")
    public R<User> findUserByAccount(@RequestParam("userAccount") String userAccount, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/user/web")
    public void add(@RequestBody User user, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
